{% extends "home/content_layout.html" %}

{% block head %}
    {{ super() }}
    <meta name="description" content="《HelloGitHub 月刊》{{ page_title }}，近期有趣、适合新手、练手项目尽在 HelloGitHub.com ">
{% endblock %}

{% block content %}
{% for projects in contents %}
    <h2 class="content-subhead">{{ projects.pop(0) }}</h2>
    {% for project in projects%}
        {{ project.index_num }}、<a target="_blank" href="{{ project.project_url }}">{{ project.title }}</a>
        {% if project.collected == 1 %}
            <i id="collect_{{ project.id }}" class="fa fa-heart color-blue"></i>
            <span hidden="hidden">{{ project.collected_project_id }}</span>
        {% else %}
            <i id="collect_{{ project.id }}" class="fa fa-heart-o color-blue"></i>
            <span hidden="hidden"></span>
        {% endif %}
        <p>
        {{ project.description|safe }}
        {% if project.image_url %}
            <br><img style="max-width:100%;" src="{{ project.image_url }}" alt="{{ project.title }}">
        {% endif %}
        </p>
    {% endfor %}
{% endfor %}
<hr/>
{# 翻页 #}
<div class="pure-g">
    <div class="pure-u-1-3">
        {% if 0<current_volume_index<volume_name_list.__len__() %}
        <div class="pre">
            <a class="button-small pure-button pure-button-primary" href="/volume/{{ volume_name_list[current_volume_index - 1] }}/">上一期</a>
        </div>
        {% endif %}
    </div>
    <div class="pure-u-1-3">
        <div class="social-share" data-sites="weibo,wechat" align="center"></div>
    </div>
    <div class="pure-u-1-3">
        {% if 0<=current_volume_index<volume_name_list.__len__() - 1 %}
        <div class="next">
            <a class="button-small pure-button pure-button-primary" href="/volume/{{ volume_name_list[current_volume_index + 1] }}/">下一期</a>
        </div>
        {% endif %}
    </div>
</div>
{% endblock %}